package com.ht.aems.eas;

import com.ht.aems.fesmodel.RtMeasureQuery;
import com.ht.aems.fesmodel.RtMeasureSaver;
import com.ht.aems.ieeeformat.IEEEDataIsland;
import com.ht.aems.util.RtDataHandler;
import com.ht.psplan.PlanInfo;
import devmodel.MapObject;
import devmodel.PhysDevToIeeeIndex;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: Dong Shufeng
 * Date: 11-9-7
 */
public class EasSysModel {
    public static EasSysModel INSTANCE = new EasSysModel();

    private long avcStartTime = 0;
    private long avcEndTime = 0;
    private long seSectionTime = 0;
    private long opfStartTime = 0;
    private long opfEndTime = 0;
    private long cimTime = 0;
    private boolean isOpfConverged = false;
    private Map<PhysDevToIeeeIndex, IEEEDataIsland> calModel;
    private Map<String, PlanInfo> plans = new HashMap<String, PlanInfo>();
    private Map<String, List<String>> substationEquipIds;
    private Map<String, MapObject> cimEquipments;

    private RtDataHandler rtDataHandler;
    private RtMeasureQuery rtMeasureQuery;
    private RtMeasureSaver rtMeasureSaver;

    private EasSysModel() {
    }

    public long getAvcStartTime() {
        return avcStartTime;
    }

    public void setAvcStartTime(long avcStartTime) {
        this.avcStartTime = avcStartTime;
    }

    public long getAvcEndTime() {
        return avcEndTime;
    }

    public void setAvcEndTime(long avcEndTime) {
        this.avcEndTime = avcEndTime;
    }

    public long getSeSectionTime() {
        return seSectionTime;
    }

    public void setSeSectionTime(long seSectionTime) {
        this.seSectionTime = seSectionTime;
    }

    public Map<PhysDevToIeeeIndex, IEEEDataIsland> getCalModel() {
        return calModel;
    }

    public void setCalModel(Map<PhysDevToIeeeIndex, IEEEDataIsland> calModel) {
        this.calModel = calModel;
    }

    public RtDataHandler getRtDataHandler() {
        return rtDataHandler;
    }

    public void setRtDataHandler(RtDataHandler rtDataHandler) {
        this.rtDataHandler = rtDataHandler;
    }

    public RtMeasureQuery getRtMeasureQuery() {
        return rtMeasureQuery;
    }

    public void setRtMeasureQuery(RtMeasureQuery rtMeasureQuery) {
        this.rtMeasureQuery = rtMeasureQuery;
    }

    public RtMeasureSaver getRtMeasureSaver() {
        return rtMeasureSaver;
    }

    public void setRtMeasureSaver(RtMeasureSaver rtMeasureSaver) {
        this.rtMeasureSaver = rtMeasureSaver;
    }

    public Map<String, PlanInfo> getPlans() {
        return plans;
    }

    public Map<String, List<String>> getSubstationEquipIds() {
        return substationEquipIds;
    }

    public void setSubstationEquipIds(Map<String, List<String>> substationEquipIds) {
        this.substationEquipIds = substationEquipIds;
    }

    public long getCimTime() {
        return cimTime;
    }

    public void setCimTime(long cimTime) {
        this.cimTime = cimTime;
    }

    public Map<String, MapObject> getCimEquipments() {
        return cimEquipments;
    }

    public void setCimEquipments(Map<String, MapObject> cimEquipments) {
        this.cimEquipments = cimEquipments;
    }

    public long getOpfStartTime() {
        return opfStartTime;
    }

    public void setOpfStartTime(long opfStartTime) {
        this.opfStartTime = opfStartTime;
    }

    public long getOpfEndTime() {
        return opfEndTime;
    }

    public void setOpfEndTime(long opfEndTime) {
        this.opfEndTime = opfEndTime;
    }

    public boolean isOpfConverged() {
        return isOpfConverged;
    }

    public void setOpfConverged(boolean opfConverged) {
        isOpfConverged = opfConverged;
    }
}
